< previous page page_963 next page >

Page 963
button from the Table Structure window. Enter the name of the primary key (PKtblCustomers), and click the ID field in the Available Fields list box. Make sure that the Primary and Unique checkboxes have been checked. Finally, click OK to build the primary key index.
4. Select the tblCustomers table from the Database window and click the alternate mouse button. Select Design from the menu that appears. Next, select Print Structure in the bottom right corner of the Table Structure window.
5. To enter records, first double-click tblCustomers. You can enter data in any Form type you want; however, you can only to enter Notes data in the Grid form.
6. To copy a table structure, highlight the table, click the alternate mouse button, and select Copy Structure. Leave the Target Connect String empty and make sure that neither the Copy Indexes, nor the Copy Data checkboxes are checked. Enter the table name tblVendors when prompted for the name of the new table. Select the OK button to create the table.
Once the table is copied, you should then go into the table design and add a primary key. Build this index the same way you built the primary key for the tblCustomers table.
7. To export, select File | Import/Export. Select the tblCustomers table and then press Export Table(s). Next choose the text format as the data source, and click OK. You are then prompted to enter a path and a name. Select Save, and the file is created.
Review the file. Notice that empty fields in a record are denoted by the use of two commas (,,).
Day 8
Answers to Day 8 Quiz
1. SQL stands for Structured Query Language. You pronounce SQL by saying the three individual letters (ess-que-ell). It is not pronounced sequel.
2. Use the SELECT_FROM statement to select information from table fields.
3. Use the asterisk (*) in a SELECT_FROM statement to select all the fields in a data table. For example, to select all fields in a table of customers, you can enter the following SQL statement:
SELECT * FROM Customers
4. Use the ORDER BY clause to sort the data you display. For example, to sort the data from quiz answer 3 by a field contained within the table, CustomerID, you would enter the following:
SELECT * FROM Customers ORDER BY CustomerID

 
< previous page page_963 next page >

If you like this book, buy it!